def sum_2_nums(a, b, *args):  # 不定长参数一定要在最后
    print("-" * 30)
    print("a=%d" % a)
    print("b=%d" % b)
    print(args)
    print("args=" + str(args))

    result = a + b
    for num in args:
        result += num

    print("result=%d" % result)


sum_2_nums(11, 22, 33, 44, 55, 66, 77, 88)  # args=(33, 44, 55, 66, 77, 88)
sum_2_nums(11, 22, 33, 44)  # args=(33, 44)
sum_2_nums(11, 22, 33)  # 假如只有一个不定长参数时，会args=(33,)
sum_2_nums(11, 22)
# sum_2_nums(11)#错误,因为 形参中 至少要2个实参
